@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
pushd src
echo Y | del /s /f build.log 2>nul >nul
for /f "usebackq delims=" %%d in (`dir /ad /s /b`) do (
	set p=%%d
	set p=!p:%cd%\=!
	echo * Compiling in !p!
	javac !p!/*.java 2> !p!/build.log
	echo Completed at %date% %time% >> !p!/build.log
)
popd

for /f "usebackq delims=" %%f in (`dir /a /s /b build.log`) do (
	set p=%%f
	set p=!p:%cd%\=!
	echo Log file created: !p!
)
pause